import request from '@/utils/request'

// 获取搜索建议列表
const getSuggListAPI = ({ keyword }) => {
  return request({
    method: 'get',
    url: '/v1_0/suggestion',
    params: {
      q: keyword
    }
  })
}

// 获取搜索结果列表
const getSearchResultListAPI = ({ keyword, page = 1 }) => {
  return request({
    method: 'get',
    url: '/v1_0/search',
    params: {
      q: keyword,
      page
    }
  })
}
export {
  getSuggListAPI,
  getSearchResultListAPI
}
